package com.fhz.shop.ui.home;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.fhz.shop.callback.ApiResponse;
import com.fhz.shop.entity.GoodsInfoLocal;
import com.fhz.shop.entity.PageHelper;

import java.util.List;

import javax.inject.Inject;

import dagger.hilt.android.lifecycle.HiltViewModel;

@HiltViewModel
public class HomeViewModel extends ViewModel {

    @Inject
    HomeRepository mHomeRepository;

    @Inject
    public HomeViewModel() {
    }

    public  LiveData<ApiResponse<PageHelper<GoodsInfoLocal>>> getGoodsInfo(int page, int pageSize){
        return mHomeRepository.getGoodsInfo(page, pageSize);
    }

}